<template>
  <div>
    <div class="financeInventoryDetail">
      <financialInventory />
    </div>
    <div v-if="state == 'paidApproval'">
      <approvalOperate />
    </div>

    <div v-else>
      <el-bottom-guide>
        <ul class="ccui-bottom-button">
          <li>
            <el-button
              type="bottom"
              icon="icon-ccui-return"
              @click="handleBack(from)"
              >返回</el-button
            >
          </li>
        </ul>
      </el-bottom-guide>
    </div>
  </div>
</template>

<script>
import financialInventory from "../../paidConfirmList/views/paidConfirmDetails";
import approvalOperate from "@/basa/components/public/approval/approval-operate";
// import publicComponent from "@/basa/components/public";
export default {
  components: {
    // breadcrumb: publicComponent.breadcrumb,
    approvalOperate,
    financialInventory
  },
  data() {
    return {};
  },
  computed: {
    breadcrumbLastItem() {
      return this.$route.query.name;
    },
    state() {
      return this.$route.query.states;
    },
    from() {
      return this.$route.query.from;
    }
  },
  methods: {
    handleBack(from) {
      let urlList = {
        all: "/paymentManagement/paidApprove/approvalAll",
        pass: "/paymentManagement/paidApprove/approvalPass",
        pending: "/paymentManagement/paidApprove/approvalPending"
      };
      this.$router.push(urlList[from]);
    }
  }
};
</script>

<style lang="scss">
.financeWarehousingDetail {
  .ccui-navigation {
    display: none;
  }
  .el-bottom-guide {
    display: none;
  }
  .approval-navigation {
    &.ccui-navigation {
      display: block;
    }
  }
}
</style>
